package map;

import java.awt.*;
import java.util.ArrayList;
import building.*;
import player.*;

public class Map {

	//Test-Spieler
	public static Player player1 = new Player("wllsk", Color.GREEN);
	
	//Grid-Objekt
	private Grid grid;
	
	//width and height in boxes, not pixels
	protected static int width;
	protected static int height;
	final protected static int TILESIZE=50;
	
	
	//constructors
	protected Map() {
	}
	public Map(int w, int h) {
		width=w;
		height=h;
	}	
	protected Map(Map m) {
	}	
	
	//METHODEN
	//Instanzieren des Rasters
	public void createGrid() {	
		grid=new Grid(this);
		grid.create();
	}
	
	//Malen-FKT
	public Cell draw(Graphics2D g) {
		return grid.draw(g);
	}
	
	//Bauen... Kontrolle nach Base.Capitol
	public Base build(Cell c,Player p) {
		Base cap= new Capitol();		
		c.color=Color.red;
		//auf player1-zum testen
		return cap.build(c,player1);
	}
	
	
	//Get List
	public ArrayList<Cell> getList() {
		return grid.getList();
	}

}
